package com.atguigu;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.WeightedResponseTimeRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class MyselfRule {

    //设置为随机负载均衡，默认是轮询策略
    @Bean
    public IRule setIRule(){
        return new RandomRule();
    }
}
